package cn.cdeden.knowledge.mapper;


import cn.cdeden.knowledge.domain.EnterpriseTemplateTree;
import cn.cdeden.knowledge.domain.Template;
import cn.cdeden.knowledge.domain.dto.EnterpriseTemplateTreeQueryParam;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author GW
* @date 2022-11-30
*/
@Repository
public interface EnterpriseTemplateTreeMapper extends BaseMapper<EnterpriseTemplateTree> {
    public IPage<Template> communityQueryTemplate(String state, Long parentId , Long userId , Boolean isFree , String sorted1, String realName, List<String> documentTypes, IPage<Template> iPage);

    public IPage<Template> queryLikesAndCollection(List<Long> ids , Long userId, String state ,IPage<Template> iPage);

    public IPage<Template> hotTemplate(Long userId ,String type , String state ,IPage <Template> iPage);

    public IPage<Template> downloadTemplate(Long userId , String state,IPage<Template> iPage);

    public IPage<Template> companyQueryTemplate(Long parentId,Long parentId2,Long parentId3,Long userId, String state,String sorted1,String realName ,List<String> documentTypes,IPage<Template> iPage);

    public IPage<Template> queryTemplate(@Param("page") IPage<Template> page, @Param("ew") Wrapper<EnterpriseTemplateTreeQueryParam> wrapper, @Param("userId")Long userId);


    public IPage<Template> queryCollectionTemplate(@Param("page") IPage<Template> page, String type ,String realName,@Param("userId")Long userId);

}
